<script>
import { creatEshadergradient } from './canvas'
import defaultOptions from './defaultOptions'

export default {
  props: {
    options: {
      type: Object,
      default() {
        return defaultOptions
      }
    }
  },
  data() {
    return {
      containerRef: null
    }
  },
  mounted() {
    creatEshadergradient({
      container: this.$refs.containerRef,
      ...this.options
    })
  }
}
</script>

<template>
  <div ref="containerRef" class="container">

  </div>
</template>

<style scoped>
.container {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100vh;
}
</style>
